<?php
$this->breadcrumbs = array(
    'Category' => array('index'),
    'create',
);
?>
<div class="box">
    <header>
        <h5>Edit image on banner.</h5>
    </header>
    <div class="body">

	<select id='select-parent-edit-banner'>
	    <?php foreach ($aParentCats as $parentCat) { ?>
    	    <option value="<?php echo $parentCat['category_id'] ?>" <?php if ($icat == $parentCat['category_id']) echo "selected" ?>><?php echo $parentCat['name'] ?></option>	    
	    <?php } ?>
	</select>
	<form action='' method="post" enctype="multipart/form-data">
	    <?php if ($icat == 1) {//Send a wish category ?>
    	    <div class="alert alert-info">
    		<strong>Note! </strong>The resolution of image must be 735x132.
    	    </div>
    	    <img src="<?php echo UPLOAD_URL_CAT . $aSlice[0] ?>"/>  
    	    <br/>
    	    <input type="file" name="image-insert" />
    	    <br/>
    	    <br/>
    	    <input name="changeimg" type="submit" class="btn btn-info" value="Change image"/>

	    <?php } else {
		?>
    	    <div class="alert alert-info">
    		<strong>Note! </strong>The resolution of image must be 735x269.
    	    </div>
		<?php
		foreach ($aSlice as $slice) {
		    ?>
		    <img src="<?php echo SITE_NAME_URL ?>timthumb.php?src=<?php echo UPLOAD_URL_CAT . $slice ?>&w=300&h=100"/>  
		    <input type='checkbox' name='id-img[]' value="<?php echo $slice ?>" />
		    <br/>
		    <br/>
		    <?php
		}
		?>

    	    <br/>
    	    <input type="file" name="image-insert" />
    	    <br/>
    	    <br/>
    	    <input name="deleteimg" type="submit" class="btn btn-info" value="Delete image"/>
    	    <input name="addimg" type="submit" class="btn btn-info" value="Add image"/>
		<?php
	    }
	    ?>
	</form>
    </div>
</div>
